{% load static from staticfiles %}
<style>
  @media screen and (min-width: 1300px) {
    #navbar-container {
      min-width: 1300px;
    }
  }
</style>
<nav class="navbar navbar-default navbar-inverse">
  <div class="container" id="navbar-container">

    <div class="navbar-header">
      <button type="button"
              class="navbar-toggle collapsed"
              data-toggle="collapse"
              data-target="#navbar"
              aria-expanded="false"
              aria-controls="navbar">
        <span class="sr-only">展开/收起导航条</span>
        <span class="glyphicon glyphicon-menu-hamburger" aria-hidden="true"></span>
      </button>

      <a href="/" class="logo navbar-nav">
        <img src="{% static 'images/logo.png' %}" alt="Wine游戏助手" />
        <span>Wine游戏助手</span>
      </a>
    </div>

    <div id="navbar" class="navbar-collapse collapse">
      <ul class="nav navbar-nav" id="main-nav">
        <li><a href="{% url 'downloads' %}" class="main-nav-button">下载安装</a></li>
        <li><a href="{% url 'game_list' %}">游戏列表</a></li>
        <li><a href="{% url 'game_list' %}?genres=26">软件列表</a></li>
        <li><a href="{% url 'game_list' %}?genres=29">龙芯龙架构兼容</a></li>
        <li><a href="{% url 'game_list' %}?genres=28">ARM64兼容</a></li>
        <li><a href="https://hu60.cn/q.php/bbs.forum.170.html">论坛</a></li>
        <li><a href="{% url 'about' %}">联系我们</a></li>
      </ul>
      <ul class="nav navbar-nav navbar-right">
        <li>
          <div class="search-games-content">
            <form action="{% url 'game_list' %}" method="get" class="form-inline">
              <div class="input-group">
                <input type="text"
                      name="q"
                      class="search-query form-control"
                      id="global-search"
                      placeholder="搜索…" />
                <span class="input-group-btn">
                  <button class="btn btn-default" type="submit">
                    <span class="sr-only">Search</span>
                    <span class="glyphicon glyphicon-search" aria-hidden="true"></span>
                  </button>
                </span>
              </div>
            </form>
          </div>
        </li>

        {% if user.is_authenticated %}
          <div class="account-info">
            <a href="{% url 'user_account' user.username %}">
              <img src="{{user.avatar_url}}" title="{{user.username}}"/>
            </a>
          </div>
        {% else %}
          <div class="account-action">
            <a href="{% url 'login' %}">登录</a>
            <a href="{% url 'register' %}"><strong>注册</strong></a>
          </div>
        {% endif %}
      </ul>
    </div>

  </div>
</nav>
